import request from "@/utils/request";
import type { RequestParams, ResponseData, MarkerRequestParams } from "./type";

// 分页列表
export const MarkerList = (data: RequestParams) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robotMarker/page",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const optionsList = (data: RequestParams) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robot/options",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const addMarker = (data: MarkerRequestParams) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robotMarker/add",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const delMarker = (id: number) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robotMarker/delete",
    method: "post",
    data: id,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const FormMarker = (id: number) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robotMarker/form",
    method: "post",
    data: id,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const updateMarker = (id: number) => {
  return request<ResponseData<MarkerRequestParams>, any>({
    url: "/api/v1/robotMarker/update",
    method: "post",
    data: id,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
